<template>
  <div>
    <base-layout :visibleContent2="true">
      <template #searchPanel>
        <el-form :inline="true" :model="fromdata" label-width="110px">
          <el-row>
            <el-col :span="12">入库单基础信息</el-col>
          </el-row>
          <el-divider content-position="center"></el-divider>
          <el-row>
            <el-col :span="6">
              <el-form-item label="盘点单号:">
                <div>{{ fromdata.code }}</div>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="盘点门店:">
                <div>{{ fromdata.storeName }}</div>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="盘点仓库:">
                <div>{{ fromdata.storageName }}</div>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="单据日期:">
                <div>{{ fromdata.receiptsTime }}</div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="盘点配件数量:">
                <div>{{ fromdata.checkNumber + "/" + fromdata.partsNumber }}</div>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="盘点工时:">
                <div style="color: #f40">{{ fromdata.workHours }}</div>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="盘点状态:">
                <div>{{ fromdata.status }}</div>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="12">
              <el-form-item label="入库备注:">
                <div>{{ fromdata.remark }}</div>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </template>
      <template #contentPanel>
        <el-form :inline="true" :model="fromdata" label-width="110px">
          <el-row>
            <el-col :span="12">盘点负责人员</el-col>
          </el-row>
          <el-divider content-position="center"></el-divider>
          <el-row>
            <el-col :span="6">
              <el-form-item label="盘点负责人:">
                <div>{{ fromdata.userName }}</div>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="联系方式:">
                <div>{{ fromdata.phone }}</div>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </template>
      <template #contentPanel2>
        <el-form :inline="true" :model="fromdata" label-width="110px">
          <el-row>
            <el-col :span="12">盘点进度</el-col>
          </el-row>
          <el-divider content-position="center"></el-divider>
          <Steps
            v-if="setpsList != null && setpsList.length > 0"
            :setpsList="setpsList"
          />
        </el-form>
      </template>
    </base-layout>
  </div>
</template>

<script>
import baseMixin from "@/mixins/base";
import { Steps } from "@/components/index";
export default {
  name: "editClientManage",
  components: { Steps },
  props: {
    fromdata: {
      type: Object,
      default: () => ({}),
    },
  },
  watch: {
    fromdata: function (value) {
      this.setpsList = value.statusList;
    },
  },
  mixins: [
    baseMixin({
      format(res) {
        return res.map((data) => {
          return data;
        });
      },
    }),
  ],
  data() {
    return {
      setpsList: null,
    };
  },
  created() {
    this.setpsList = this.fromdata.statusList;
  },
};
</script>

<style lang="scss" scoped>
.el-table .delete-row {
  background: #f5f7fa;
  color: #ccc !important;
}
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 80px;
  height: 80px;
  display: block;
}
</style>
